﻿<?xml version="1.0" encoding="utf-8"?>
<UserControl
	x:Class="ICSharpCode.WpfDesign.Designer.Controls.GridUnitSelector" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	x:Name="control"
	HorizontalContentAlignment="Left"
	VerticalContentAlignment="Top">
	<UserControl.Resources>
		<Style
			TargetType="RadioButton">
			<Setter
				Property="Template">
				<Setter.Value>
					<ControlTemplate>
						<ToggleButton
							IsChecked="{Binding Path=IsChecked, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
							Content="{Binding Path=Content, RelativeSource={RelativeSource TemplatedParent}}"
							Padding="{Binding Path=Padding, RelativeSource={RelativeSource TemplatedParent}}"
							Name="toggleButton" />
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
	</UserControl.Resources>
	<Border
		CornerRadius="3"
		BorderBrush="CornflowerBlue"
		Background="LightBlue"
		BorderThickness="1">
		<StackPanel
			Orientation="{Binding Orientation, ElementName=control}">
			<RadioButton
				x:Name="fixed"
				Content="Fixed"
				Margin="1"
				FontSize="8"
				ToolTip="Fixed - Column size is fixed width"
				GroupName="group"
				Checked="FixedChecked" />
			<RadioButton
				x:Name="star"
				Margin="1"
				FontSize="16"
				ToolTip="Star - Column size is weighted proportion"
				GroupName="group"
				Checked="StarChecked">
				<TextBlock
					Text="*"
					Margin="3,-4,3,-8" />
			</RadioButton>
			<RadioButton
				x:Name="auto"
				Content="Auto"
				Margin="1"
				FontSize="8"
				ToolTip="Auto - Column size is determined by the Content(s)"
				GroupName="group"
				Checked="AutoChecked" />
		</StackPanel>
	</Border>
</UserControl>